package com.blog.blog.service;

import com.blog.blog.common.PageResponse;
import com.blog.blog.dto.ArticleListQueryDTO;
import com.blog.blog.vo.ArticleListItemVO;
import com.blog.blog.vo.ArticleDetailVO;
import com.blog.blog.vo.CommentVO;
import com.blog.blog.dto.CreateCommentDTO;
import com.blog.blog.vo.CategoryVO;
import com.blog.blog.vo.TagVO;
import com.blog.blog.vo.CommentTreeVO;

public interface ArticleService {
    PageResponse<ArticleListItemVO> pageArticles(ArticleListQueryDTO queryDTO);

    ArticleDetailVO getArticleDetail(Long id);

    void likeArticle(Long id);

    java.util.List<CommentVO> listComments(Long articleId);

    void addComment(CreateCommentDTO dto);

    PageResponse<CommentTreeVO> pageCommentTrees(Long articleId, Integer pageNo, Integer pageSize);

    java.util.List<CategoryVO> listCategories();

    java.util.List<TagVO> listTags();

    java.util.List<ArticleListItemVO> listRelatedArticles(Long id, Integer limit);

    java.util.List<ArticleListItemVO> listHotArticles(Integer limit, Long categoryId, Long tagId, Integer sinceDays);

    java.util.List<com.blog.blog.vo.ArticleArchiveItemVO> listArchives(Integer limit);

    com.blog.blog.common.PageResponse<com.blog.blog.vo.ArticleArchiveItemVO> pageArchives(Integer pageNo, Integer pageSize);
    com.blog.blog.common.PageResponse<ArticleListItemVO> pageHot(Integer pageNo, Integer pageSize, Long categoryId, Long tagId, Integer sinceDays);

    java.util.List<ArticleListItemVO> listRecentPublished(Integer limit);

    // 管理端 CRUD
    Long createArticle(com.blog.blog.dto.SaveArticleDTO dto, Long authorId);
    boolean updateArticle(Long id, com.blog.blog.dto.SaveArticleDTO dto);
    boolean deleteArticle(Long id);
}


